[$25 BOUNTY] [Rust] Add signal shutdown integration harness - #122
Open
Saiaaax wants to merge 5 commits into
Open
[$25 BOUNTY] [Rust] Add signal shutdown integration harness#122Saiaaax wants to merge 5 commits into
Saiaaax wants to merge 5 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a signal-based shutdown integration harness for the Rust backend that exercises and verifies the SIGTERM/SIGINT graceful shutdown path.
Closes #67
Changes
New file:
backend/src/signal_harness.rs— Integration harness with:ShutdownSignalenum (Sigterm, Sigint variants)ShutdownOutcomeenum (Completed, TimedOut)HarnessStateenum (Idle, Notified, Draining, Finished)SignalShutdownHarnessstruct with configurable grace period,notify(),begin_drain(),complete(),timeout(),state(),trigger_signal(), andgrace_period()methodstest_sigterm_notification,test_sigint_notification,test_grace_period_expiration,test_successful_completionUpdated:
backend/src/lib.rs— Addedpub mod signal_harness;Updated:
docs/OPERATIONS.md— Added "Signal Shutdown Harness" section documenting the harness API, signal types, harness states, unit tests, how to run tests, and production integration with Kubernetes pod terminationNew:
diagnostic/build-ec966bc5.logdanddiagnostic/build-ec966bc5.json— Diagnostic build artifactsTesting
The harness includes four unit tests covering critical shutdown paths:
Run with:
cd backend && cargo test signal_harnessChecklist
Payout address: 0x5253757322092903C2F0a8EfEed592344216CC7E
Diagnostic artifact reference: diagnostic/build-ec966bc5.logd